﻿using System;

namespace FtpLibDotNet
{
    public class FtpCommandException : FtpException
    {
        internal FtpResponse Response { get; private set; }
        public int ResponseCode { get { return Response.Code; } }
        public string ResponseText { get { return Response.Data; } }

        internal FtpCommandException(FtpResponse response, string message)
            : base(message)
        {
            this.Response = response;
        }

        internal FtpCommandException(FtpResponse response, string message, Exception innerException)
            : base(message, innerException)
        {
            this.Response = response;
        }
    }
}